// ignore_for_file: non_constant_identifier_names

import 'package:package_info_plus/package_info_plus.dart';

import '../models/package_info_model.dart';

/// 全局工具类
class Utils {
  ///
  /// 获取项目信息
  ///
  static Future<PackageInfoData> cnm_getPackageInfo() async {
    PackageInfo packageInfo = await PackageInfo.fromPlatform();

    PackageInfoData info = PackageInfoData(
      appName: packageInfo.appName,
      packageName: packageInfo.packageName,
      version: packageInfo.version,
      buildNumber: packageInfo.buildNumber,
    );

    return info;
  }
}
